home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / pgm_util / sealit / wizard / cexample / cexample.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-07  |  1.2 KB  |  45 lines

  1. // Kustom Magic Software, Copyright (c) 1995, Ralph Krausse
  2. // File Created on 1/7/96 10:58:23 AM
  3.  
  4. #include "cexample.h "
  5.  
  6. APPINFO AppInfo;
  7. CEXAMPLE CExample;
  8.  
  9. int main(void)
  10. {
  11.       char szPath[_MAX_PATH];
  12.       int wErr = 0,wSealLen = 0;
  13.  
  14.       getcwd(szPath,100);
  15.       strcat(szPath,"\\cexample.exe");
  16.       strcpy(AppInfo.szAppName,szPath);
  17.  
  18.       AppInfo.bOverWriteSeal = 0;
  19.       strcpy(AppInfo.szMagicString,"demomagicstring");
  20.  
  21.       wSealLen = sizeof(CEXAMPLE);
  22.       if(wErr = ValidateApplication(&AppInfo, wSealLen, &CExample))
  23.           {
  24.           if(wErr)
  25.               {
  26.               char szErrorString[250]; 
  27.               GetSealError (wErr, szErrorString);
  28.               printf("Error %d, %s\n",wErr,szErrorString);
  29.               }
  30.           }
  31.       else
  32.           {
  33.           // the CExample struct will be filled with the information.
  34.           
  35.           printf("%d\n",CExample.bWinNT);
  36.           printf("%d\n",CExample.bWin95);
  37.           printf("%d\n",CExample.bWin31);
  38.           printf("%ld\n",CExample.dtExpirationDate);
  39.           printf("%s\n",CExample.szCompany);
  40.           printf("%s\n",CExample.szName);
  41.           printf("%s\n",CExample.szMagicString);
  42.           }
  43.   return(0);
  44. }
  45.